public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] new package notification
@ 2002-07-26 16:44 Gregg
  2002-07-26 16:44 ` [gentoo-dev] [gentoo-user] " Gregg
                   ` (4 more replies)
  0 siblings, 5 replies; 28+ messages in thread
From: Gregg @ 2002-07-26 16:44 UTC (permalink / raw
  To: gentoo-dev; +Cc: gentoo-user

I have mentioned this a couple times to usually no response.  I feel that
it is an important feature , I was hoping to get some sort of response to
this as to  how it should be done, or a response saying "we are already
working on that". Either way is fine by me :)

I want to see a list of new packages that are available after an rsync. 
Not updates to packages that were already there, but new directories in
the portage tree.

I keep my gentoo box as close to "portage only" as possible.  It makes
management easier and makes everything fit together the way it should. 
The Gentoo way.  In doing so, I deny myself some applications taht do not
have ebuilds yet.  I would love to see a list after an emerge rsync of
what NEW packages that were not in my portage before, have been added. 
This will let me see whats new that I might install.

Ideas range from portage keeping a log of what directories it actually
creates durring rsync and allowing you to output that to a text file.  To
a script you run before and after that builds a list of the directories in
the tree and compares the 2 lists, showing you the new directories. Im
sure there are other ways as well.

Any ideas?  Anyone already have this working?





^ permalink raw reply	[flat|nested] 28+ messages in thread

* [gentoo-dev] [gentoo-user] new package notification
  2002-07-26 16:44 [gentoo-dev] new package notification Gregg
@ 2002-07-26 16:44 ` Gregg
  2002-07-26 17:20 ` [gentoo-dev] " Alexander Gretencord
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 28+ messages in thread
From: Gregg @ 2002-07-26 16:44 UTC (permalink / raw
  To: gentoo-dev; +Cc: gentoo-user

I have mentioned this a couple times to usually no response.  I feel that
it is an important feature , I was hoping to get some sort of response to
this as to  how it should be done, or a response saying "we are already
working on that". Either way is fine by me :)

I want to see a list of new packages that are available after an rsync. 
Not updates to packages that were already there, but new directories in
the portage tree.

I keep my gentoo box as close to "portage only" as possible.  It makes
management easier and makes everything fit together the way it should. 
The Gentoo way.  In doing so, I deny myself some applications taht do not
have ebuilds yet.  I would love to see a list after an emerge rsync of
what NEW packages that were not in my portage before, have been added. 
This will let me see whats new that I might install.

Ideas range from portage keeping a log of what directories it actually
creates durring rsync and allowing you to output that to a text file.  To
a script you run before and after that builds a list of the directories in
the tree and compares the 2 lists, showing you the new directories. Im
sure there are other ways as well.

Any ideas?  Anyone already have this working?



_______________________________________________
gentoo-user mailing list
gentoo-user@gentoo.org
http://lists.gentoo.org/mailman/listinfo/gentoo-user



^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [gentoo-dev] new package notification
  2002-07-26 16:44 [gentoo-dev] new package notification Gregg
  2002-07-26 16:44 ` [gentoo-dev] [gentoo-user] " Gregg
@ 2002-07-26 17:20 ` Alexander Gretencord
  2002-07-26 18:50   ` Gregg
  2002-07-26 17:39 ` [gentoo-dev] Re: [gentoo-user] " Robert Cole
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 28+ messages in thread
From: Alexander Gretencord @ 2002-07-26 17:20 UTC (permalink / raw
  To: gentoo-dev

On Friday 26 July 2002 18:44, Gregg wrote:
> I want to see a list of new packages that are available after an rsync.
> Not updates to packages that were already there, but new directories in
> the portage tree.

Do a "find /usr/portage/ -type d > before" before the emerge rsync and the 
same after rsyncing but into file "after". The do a "diff before after". 
After doing this once you can just move the after file to before everytime so 
you don't have to do a find before the next rsync but just use the last 
after-file. You could tell it to not print the files dir so you will only get 
the new packages directory and not the files dir which holds the digests and 
patches.

just my 2(euro)cent

Alex

-- 
"They that can give up essential liberty to obtain a little temporary safety 
deserve neither liberty nor safety."
Benjamin Franklin



^ permalink raw reply	[flat|nested] 28+ messages in thread

* [gentoo-dev] Re: [gentoo-user] new package notification
  2002-07-26 16:44 [gentoo-dev] new package notification Gregg
  2002-07-26 16:44 ` [gentoo-dev] [gentoo-user] " Gregg
  2002-07-26 17:20 ` [gentoo-dev] " Alexander Gretencord
@ 2002-07-26 17:39 ` Robert Cole
  2002-07-26 17:39   ` Robert Cole
  2002-07-27 23:44 ` Hannes Mehnert
  2002-09-10 16:30 ` [gentoo-dev] " Matthew Kennedy
  4 siblings, 1 reply; 28+ messages in thread
From: Robert Cole @ 2002-07-26 17:39 UTC (permalink / raw
  To: gregg, gentoo-dev; +Cc: gentoo-user

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I think that's a great idea. I do the same as far as keeping my system as 
close to portage as possible. I've had to deviate a little lately but for the 
most part everything I need is in the tree.

Since you have to do rsync's as root anyway how about just outputting a text 
file to /root?

Robert

On Friday 26 July 2002 09:44 am, Gregg wrote:
> I have mentioned this a couple times to usually no response.  I feel that
> it is an important feature , I was hoping to get some sort of response to
> this as to  how it should be done, or a response saying "we are already
> working on that". Either way is fine by me :)
>
> I want to see a list of new packages that are available after an rsync.
> Not updates to packages that were already there, but new directories in
> the portage tree.
>
> I keep my gentoo box as close to "portage only" as possible.  It makes
> management easier and makes everything fit together the way it should.
> The Gentoo way.  In doing so, I deny myself some applications taht do not
> have ebuilds yet.  I would love to see a list after an emerge rsync of
> what NEW packages that were not in my portage before, have been added.
> This will let me see whats new that I might install.
>
> Ideas range from portage keeping a log of what directories it actually
> creates durring rsync and allowing you to output that to a text file.  To
> a script you run before and after that builds a list of the directories in
> the tree and compares the 2 lists, showing you the new directories. Im
> sure there are other ways as well.
>
> Any ideas?  Anyone already have this working?
>
>
>
> _______________________________________________
> gentoo-user mailing list
> gentoo-user@gentoo.org
> http://lists.gentoo.org/mailman/listinfo/gentoo-user
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9QYlYOWbzte5wVEURAgRNAJ0SI1AZd6ldteWr9AvxCaN35tkT0QCeNBQb
bnpvLL8xxpCcj9GMwOPi5PY=
=2Rp2
-----END PGP SIGNATURE-----



^ permalink raw reply	[flat|nested] 28+ messages in thread

* [gentoo-dev] Re: [gentoo-user] new package notification
  2002-07-26 17:39 ` [gentoo-dev] Re: [gentoo-user] " Robert Cole
@ 2002-07-26 17:39   ` Robert Cole
  0 siblings, 0 replies; 28+ messages in thread
From: Robert Cole @ 2002-07-26 17:39 UTC (permalink / raw
  To: gregg, gentoo-dev; +Cc: gentoo-user

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I think that's a great idea. I do the same as far as keeping my system as 
close to portage as possible. I've had to deviate a little lately but for the 
most part everything I need is in the tree.

Since you have to do rsync's as root anyway how about just outputting a text 
file to /root?

Robert

On Friday 26 July 2002 09:44 am, Gregg wrote:
> I have mentioned this a couple times to usually no response.  I feel that
> it is an important feature , I was hoping to get some sort of response to
> this as to  how it should be done, or a response saying "we are already
> working on that". Either way is fine by me :)
>
> I want to see a list of new packages that are available after an rsync.
> Not updates to packages that were already there, but new directories in
> the portage tree.
>
> I keep my gentoo box as close to "portage only" as possible.  It makes
> management easier and makes everything fit together the way it should.
> The Gentoo way.  In doing so, I deny myself some applications taht do not
> have ebuilds yet.  I would love to see a list after an emerge rsync of
> what NEW packages that were not in my portage before, have been added.
> This will let me see whats new that I might install.
>
> Ideas range from portage keeping a log of what directories it actually
> creates durring rsync and allowing you to output that to a text file.  To
> a script you run before and after that builds a list of the directories in
> the tree and compares the 2 lists, showing you the new directories. Im
> sure there are other ways as well.
>
> Any ideas?  Anyone already have this working?
>
>
>
> _______________________________________________
> gentoo-user mailing list
> gentoo-user@gentoo.org
> http://lists.gentoo.org/mailman/listinfo/gentoo-user
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9QYlYOWbzte5wVEURAgRNAJ0SI1AZd6ldteWr9AvxCaN35tkT0QCeNBQb
bnpvLL8xxpCcj9GMwOPi5PY=
=2Rp2
-----END PGP SIGNATURE-----

_______________________________________________
gentoo-user mailing list
gentoo-user@gentoo.org
http://lists.gentoo.org/mailman/listinfo/gentoo-user



^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [gentoo-dev] new package notification
  2002-07-26 17:20 ` [gentoo-dev] " Alexander Gretencord
@ 2002-07-26 18:50   ` Gregg
  2002-07-26 19:54     ` Marko Mikulicic
       [not found]     ` <3D41A376.4060305@seul.org>
  0 siblings, 2 replies; 28+ messages in thread
From: Gregg @ 2002-07-26 18:50 UTC (permalink / raw
  To: arutha; +Cc: gentoo-dev

So...

Something along these lines is in order:

rm /root/before
rm /root/after
rm /root/new
find /usr/portage -type d | grep -i -v files >/root/before
emerge rsync
find /usr/portage -type d | grep -i -v files >/root/after
diff /root/before /root/after | tee /root/new


That cleans up the old files, buids the before list, emerged, builds the
after (both ignoring the files directory,) and then outputs the diff to
screen and file

Anyone up to making this a neat little script?


> On Friday 26 July 2002 18:44, Gregg wrote:
>> I want to see a list of new packages that are available after an
>> rsync. Not updates to packages that were already there, but new
>> directories in the portage tree.
>
> Do a "find /usr/portage/ -type d > before" before the emerge rsync and
> the  same after rsyncing but into file "after". The do a "diff before
> after".  After doing this once you can just move the after file to
> before everytime so  you don't have to do a find before the next rsync
> but just use the last  after-file. You could tell it to not print the
> files dir so you will only get  the new packages directory and not the
> files dir which holds the digests and  patches.
>
> just my 2(euro)cent
>
> Alex
>
> --
> "They that can give up essential liberty to obtain a little temporary
> safety  deserve neither liberty nor safety."
> Benjamin Franklin
>
> _______________________________________________
> gentoo-dev mailing list
> gentoo-dev@gentoo.org
> http://lists.gentoo.org/mailman/listinfo/gentoo-dev





^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [gentoo-dev] new package notification
  2002-07-26 18:50   ` Gregg
@ 2002-07-26 19:54     ` Marko Mikulicic
  2002-07-26 20:03       ` Gregg
       [not found]     ` <3D41A376.4060305@seul.org>
  1 sibling, 1 reply; 28+ messages in thread
From: Marko Mikulicic @ 2002-07-26 19:54 UTC (permalink / raw
  To: gentoo-dev

(sorry for posting this message on a new thread but
I had some problems with the headers of the original message)

Gregg wrote:
  > So...
  >
  > Something along these lines is in order:
  >
  > rm /root/before
  > rm /root/after
  > rm /root/new
  > find /usr/portage -type d | grep -i -v files >/root/before
  > emerge rsync
  > find /usr/portage -type d | grep -i -v files >/root/after
  > diff /root/before /root/after | tee /root/new
  >
  >
  > That cleans up the old files, buids the before list, emerged, builds the
  > after (both ignoring the files directory,) and then outputs the diff to
  > screen and file

good. This is a script based on your idea.
It it configurable and sends colorized output with package description
to the screen, while mainaining the log in the file.
    The log file contains only /usr/portage/... files (no diff trash)

The base directory is configurable (default /root) and the files
are called emerge-rsync.before|after|new. However I think it would
be better to store them somewhere in /var (/var/db/pkg/portage/...
/var/log) because I don't like messing in the home directory,
and if we are going to make it a system utility it should be
well integrated.

Marko

script (cannot send attachments):
<snip>
!/bin/sh
BASE=/root
USE_COLORS=yes

# end user configuration section

BEFORE=$BASE/ebuild-rsync.before
AFTER=$BASE/ebuild-rsync.after
NEW=$BASE/ebuild-rsync.new

if [ "$USE_COLORS" == "yes" ]; then
  GREEN="\033[;32m"
  NORMAL="\033[m"
fi

find /usr/portage -type d | grep -i -v files >$BEFORE
emerge rsync
find /usr/portage -type d | grep -i -v files >$AFTER
diff $BEFORE $AFTER | grep /usr/portage | sed "s/> //g" > $NEW

# cleanup
rm $BEFORE $AFTER

# display
echo
echo New ebuilds:
for i in $(cat $NEW); do
  . $(ls $i/*.ebuild --sort=time | head -n 1)

  echo -e $GREEN${i##/usr/portage/}$NORMAL: $DESCRIPTION
done

</snip>






^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [gentoo-dev] new package notification
       [not found]     ` <3D41A376.4060305@seul.org>
@ 2002-07-26 20:00       ` Gregg
  0 siblings, 0 replies; 28+ messages in thread
From: Gregg @ 2002-07-26 20:00 UTC (permalink / raw
  To: marko; +Cc: arutha, gentoo-dev

With proxy's help on the forums we had this one already.  Yours is cleaner
and I like the color output. This one shows whats been removed also. 
Possiby you could merge that ability in as well?

Gregg


#!/bin/sh

# directories in portage to ignore (not used yet)
EXCLUDE="distfiles:files:eclass:licenses:profiles:scripts:metadata:packages"

#check if this is first run
if [ ! -f /var/cache/package.cache ] ; then
    echo "initializing package cache..."
    find /usr/portage/ -type d -mindepth 2 -maxdepth 2 | sort 2>/dev/null
> /va$

else
    # move old cache (to compare to later)
    mv -f /var/cache/package.cache /var/cache/package.old 2>/dev/null

    # create new cache
     echo "Creating cache..."
     find /usr/portage/ -type d -mindepth 2 -maxdepth 2 | sort 2>/dev/null
> /v$
     echo "New:"
     diff /var/cache/package.old /var/cache/package.cache | grep \>
     echo
     echo "Removed:"
     diff /var/cache/package.old /var/cache/package.cache | grep \<
     echo
     echo "Done."
fi




> Gregg wrote:
>> So...
>>
>> Something along these lines is in order:
>>
>> rm /root/before
>> rm /root/after
>> rm /root/new
>> find /usr/portage -type d | grep -i -v files >/root/before
>> emerge rsync
>> find /usr/portage -type d | grep -i -v files >/root/after
>> diff /root/before /root/after | tee /root/new
>>
>>
>> That cleans up the old files, buids the before list, emerged, builds
>> the after (both ignoring the files directory,) and then outputs the
>> diff to screen and file
>
> good. This is a script based on your idea.
> It it configurable and sends colorized output with package description
> to the screen, while mainaining the log in the file.
>   The log file contains only /usr/portage/... files (no diff trash)
>
> The base directory is configurable (default /root) and the files
> are called emerge-rsync.before|after|new. However I think it would be
> better to store them somewhere in /var (/var/db/pkg/portage/...
> /var/log) because I don't like messing in the home directory,
> and if we are going to make it a system utility it should be
> well integrated.
>
> Marko





^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [gentoo-dev] new package notification
  2002-07-26 19:54     ` Marko Mikulicic
@ 2002-07-26 20:03       ` Gregg
  2002-07-26 20:50         ` Marko Mikulicic
  0 siblings, 1 reply; 28+ messages in thread
From: Gregg @ 2002-07-26 20:03 UTC (permalink / raw
  To: marko; +Cc: gentoo-dev

Also, as per my last email with the other script that was being worked on.
 Ive noticed that the find in that one is faster because of the min and
max depth settings.  These 2 seem to be perfect for merging together then
having exactly what we want, with it being quick and easy.

Gregg

> (sorry for posting this message on a new thread but
> I had some problems with the headers of the original message)
>
> Gregg wrote:
>   > So...
>   >
>   > Something along these lines is in order:
>   >
>   > rm /root/before
>   > rm /root/after
>   > rm /root/new
>   > find /usr/portage -type d | grep -i -v files >/root/before
>   > emerge rsync
>   > find /usr/portage -type d | grep -i -v files >/root/after
>   > diff /root/before /root/after | tee /root/new
>   >
>   >
>   > That cleans up the old files, buids the before list, emerged, builds
> the after (both ignoring the files directory,) and then outputs the
> diff to screen and file
>
> good. This is a script based on your idea.
> It it configurable and sends colorized output with package description
> to the screen, while mainaining the log in the file.
>     The log file contains only /usr/portage/... files (no diff trash)
>
> The base directory is configurable (default /root) and the files
> are called emerge-rsync.before|after|new. However I think it would be
> better to store them somewhere in /var (/var/db/pkg/portage/...
> /var/log) because I don't like messing in the home directory,
> and if we are going to make it a system utility it should be
> well integrated.
>
> Marko
>
> script (cannot send attachments):
> <snip>
> !/bin/sh
> BASE=/root
> USE_COLORS=yes
>
> # end user configuration section
>
> BEFORE=$BASE/ebuild-rsync.before
> AFTER=$BASE/ebuild-rsync.after
> NEW=$BASE/ebuild-rsync.new
>
> if [ "$USE_COLORS" == "yes" ]; then
>   GREEN="\033[;32m"
>   NORMAL="\033[m"
> fi
>
> find /usr/portage -type d | grep -i -v files >$BEFORE
> emerge rsync
> find /usr/portage -type d | grep -i -v files >$AFTER
> diff $BEFORE $AFTER | grep /usr/portage | sed "s/> //g" > $NEW
>
> # cleanup
> rm $BEFORE $AFTER
>
> # display
> echo
> echo New ebuilds:
> for i in $(cat $NEW); do
>   . $(ls $i/*.ebuild --sort=time | head -n 1)
>
>   echo -e $GREEN${i##/usr/portage/}$NORMAL: $DESCRIPTION
> done
>
> </snip>
>
>
>
>
> _______________________________________________
> gentoo-dev mailing list
> gentoo-dev@gentoo.org
> http://lists.gentoo.org/mailman/listinfo/gentoo-dev





^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [gentoo-dev] new package notification
  2002-07-26 20:03       ` Gregg
@ 2002-07-26 20:50         ` Marko Mikulicic
  2002-07-26 21:40           ` Alexander Gretencord
  2002-07-27 13:01           ` mikepolniak
  0 siblings, 2 replies; 28+ messages in thread
From: Marko Mikulicic @ 2002-07-26 20:50 UTC (permalink / raw
  To: gregg; +Cc: gentoo-dev

Gregg wrote:
> Also, as per my last email with the other script that was being worked on.
>  Ive noticed that the find in that one is faster because of the min and
> max depth settings.  These 2 seem to be perfect for merging together then
> having exactly what we want, with it being quick and easy.

Ok. I'm merging the two. I've already implemented the "remove" feture. 
It outputs in red, for consistency, but I don't know if it makes sense.

For the -maxdepth -mindepth:
I'm working to implement the 
EXCLUDE="distfiles:files:eclass:licenses:profiles:scripts:metadata:packages"
feature, but if -maxdepth 2-mindepth 2 is used it is useless because
at this directory level all we have is *.ebuild directories.
  But if the portage system will be extended to have more than two levels
of directories (instead of the "-" trik, like in "x11-libs") we'll
have to switch back.
  Ok. so I drop the EXCLUDE feature.

However the performance gain is ridiculous 0.3 seconds with recursive
vs 0.03 sec with maxdepth 2, given that rsync often takes much much longer.

What about /var/cache for script output ?
Or should I leave /root as default ?

I thought it could be called "emerge-rsync", at least until
we integrate it in emerge itself :-) ok?

I've added command line passing to emerge rysnc (for --clean)
Tell me if you like it.
I will make an ebuild for it, but I cannot provide hosting. Where should 
I put it?

So here is the script:
<snip>
#!/bin/sh
BASE=/var/cache
USE_COLORS=yes

# end user configuration section
. /etc/make.globals
BEFORE=$BASE/ebuild-rsync.before
AFTER=$BASE/ebuild-rsync.after
NEW=$BASE/ebuild-rsync.new
REMOVED=$BASE/ebuild-rsync.removed

if [ "$USE_COLORS" == "yes" ]; then
  RED="\033[;31m"
  GREEN="\033[;32m"
  NORMAL="\033[m"
fi

function portagetree () {
  find $PORTDIR -type d -mindepth 2 -maxdepth 2
}

# do it
portagetree >$BEFORE
emerge $@ rsync
portagetree >$AFTER
diff $BEFORE $AFTER | grep ">" | sed "s/> //g" > $NEW
diff $BEFORE $AFTER | grep "<" | sed "s/< //g" > $REMOVED

# cleanup
rm $BEFORE $AFTER

# display new ebuilds
if ! diff -q $NEW /dev/null >/dev/null; then
  echo
  echo New ebuilds:
  for i in $(cat $NEW); do
   . $(ls $i/*.ebuild --sort=time | head -n 1)
   echo -e $GREEN${i##$PORTDIR/}$NORMAL: $DESCRIPTION
  done
fi

# display removed ebuilds
if ! diff -q $REMOVED /dev/null >/dev/null; then
  echo
  echo Removed ebuilds:
   for i in $(cat $REMOVED); do
      echo -e $RED${i##$PORTDIR/}$NORMAL
   done
fi
</snip>






^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [gentoo-dev] new package notification
  2002-07-26 20:50         ` Marko Mikulicic
@ 2002-07-26 21:40           ` Alexander Gretencord
  2002-07-26 21:53             ` Marko Mikulicic
  2002-07-27 13:01           ` mikepolniak
  1 sibling, 1 reply; 28+ messages in thread
From: Alexander Gretencord @ 2002-07-26 21:40 UTC (permalink / raw
  To: gentoo-dev

On Friday 26 July 2002 22:50, Marko Mikulicic wrote:

> What about /var/cache for script output ?
> Or should I leave /root as default ?

/root is crap. /var is exactly for this type of data ...

> I will make an ebuild for it, but I cannot provide hosting. Where should
> I put it?

I think you should try to get this into official portage real soon :) Till 
then I could put it on my page (http://stud.upb.de/~q9tharkun/) where I 
already have my ebuilds (though most of them are now in portage anyway)

Just send me a tarball if you'd like me to put it up.


Alex
-- 
"They that can give up essential liberty to obtain a little temporary safety 
deserve neither liberty nor safety."
Benjamin Franklin



^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [gentoo-dev] new package notification
  2002-07-26 21:40           ` Alexander Gretencord
@ 2002-07-26 21:53             ` Marko Mikulicic
  2002-07-26 23:05               ` Gregg
  2002-07-27  0:17               ` Karl Trygve Kalleberg
  0 siblings, 2 replies; 28+ messages in thread
From: Marko Mikulicic @ 2002-07-26 21:53 UTC (permalink / raw
  To: Alexander Gretencord; +Cc: gentoo-dev, Karl Trygve Kalleberg

Alexander Gretencord wrote:
> On Friday 26 July 2002 22:50, Marko Mikulicic wrote:
> 
> 
>>What about /var/cache for script output ?
>>Or should I leave /root as default ?
> 
> 
> /root is crap. /var is exactly for this type of data ...
I agree

> 
> 
>>I will make an ebuild for it, but I cannot provide hosting. Where should
>>I put it?
> 
> 
> I think you should try to get this into official portage real soon :) Till 
> then I could put it on my page (http://stud.upb.de/~q9tharkun/) where I 
> already have my ebuilds (though most of them are now in portage anyway)
> 
> Just send me a tarball if you'd like me to put it up.
>

It came up to my mind that such a small tool doesn't like
to be alone, it needs some friends. I thought that the best place
for it would be "gentoolkit".
It is ok Karl? (I have already written the man page :-)

Marko




^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [gentoo-dev] new package notification
  2002-07-26 21:53             ` Marko Mikulicic
@ 2002-07-26 23:05               ` Gregg
  2002-07-27  0:17               ` Karl Trygve Kalleberg
  1 sibling, 0 replies; 28+ messages in thread
From: Gregg @ 2002-07-26 23:05 UTC (permalink / raw
  To: marko; +Cc: arutha, gentoo-dev, karltk

All I can say is wow :)

Ive wanted this for a month now.  I ask for it again and everyone steps
up.  Good job people.  This is great.

And yeah, /var/cache is where I think it should go.  I also agree that
gentoolkit would be the proper location for something like this, if they
wanted it.

Gregg

> Alexander Gretencord wrote:
>> On Friday 26 July 2002 22:50, Marko Mikulicic wrote:
>>
>>
>>>What about /var/cache for script output ?
>>>Or should I leave /root as default ?
>>
>>
>> /root is crap. /var is exactly for this type of data ...
> I agree
>
>>
>>
>>>I will make an ebuild for it, but I cannot provide hosting. Where
>>> should I put it?
>>
>>
>> I think you should try to get this into official portage real soon :)
>> Till  then I could put it on my page (http://stud.upb.de/~q9tharkun/)
>> where I  already have my ebuilds (though most of them are now in
>> portage anyway)
>>
>> Just send me a tarball if you'd like me to put it up.
>>
>
> It came up to my mind that such a small tool doesn't like
> to be alone, it needs some friends. I thought that the best place
> for it would be "gentoolkit".
> It is ok Karl? (I have already written the man page :-)
>
> Marko
>
>
> _______________________________________________
> gentoo-dev mailing list
> gentoo-dev@gentoo.org
> http://lists.gentoo.org/mailman/listinfo/gentoo-dev





^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [gentoo-dev] new package notification
  2002-07-26 21:53             ` Marko Mikulicic
  2002-07-26 23:05               ` Gregg
@ 2002-07-27  0:17               ` Karl Trygve Kalleberg
  1 sibling, 0 replies; 28+ messages in thread
From: Karl Trygve Kalleberg @ 2002-07-27  0:17 UTC (permalink / raw
  To: Marko Mikulicic; +Cc: gentoo-dev

> It came up to my mind that such a small tool doesn't like
> to be alone, it needs some friends. I thought that the best place
> for it would be "gentoolkit".
> It is ok Karl? (I have already written the man page :-)

Sounds like an ideal candidate for Gentoolkit; it's written in bash, it
has a man page, and is a very useful tool. 

Make a bug in bugs.gentoo.org, add what you have so far, and assign to me,
and we'll take it from there, okay ?


Kind regards,

Karl T



^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [gentoo-dev] new package notification
  2002-07-26 20:50         ` Marko Mikulicic
  2002-07-26 21:40           ` Alexander Gretencord
@ 2002-07-27 13:01           ` mikepolniak
  2002-07-27 14:05             ` Marko Mikulicic
  1 sibling, 1 reply; 28+ messages in thread
From: mikepolniak @ 2002-07-27 13:01 UTC (permalink / raw
  To: gentoo-dev; +Cc: marko

On Fri, 26 Jul 2002 22:50:41 +0200
Marko Mikulicic <marko@seul.org> wrote:

> Gregg wrote:
> > Also, as per my last email with the other script that was being worked on.
> >  Ive noticed that the find in that one is faster because of the min and
> > max depth settings.  These 2 seem to be perfect for merging together then
> > having exactly what we want, with it being quick and easy.
> 
> Ok. I'm merging the two. I've already implemented the "remove" feture. 
> It outputs in red, for consistency, but I don't know if it makes sense.
> 
> For the -maxdepth -mindepth:
> I'm working to implement the 
> EXCLUDE="distfiles:files:eclass:licenses:profiles:scripts:metadata:packages"
> feature, but if -maxdepth 2-mindepth 2 is used it is useless because
> at this directory level all we have is *.ebuild directories.
>   But if the portage system will be extended to have more than two levels
> of directories (instead of the "-" trik, like in "x11-libs") we'll
> have to switch back.
>   Ok. so I drop the EXCLUDE feature.
> 
> However the performance gain is ridiculous 0.3 seconds with recursive
> vs 0.03 sec with maxdepth 2, given that rsync often takes much much longer.
> 
> What about /var/cache for script output ?
> Or should I leave /root as default ?
> 
> I thought it could be called "emerge-rsync", at least until
> we integrate it in emerge itself :-) ok?
> 
> I've added command line passing to emerge rysnc (for --clean)
> Tell me if you like it.
> I will make an ebuild for it, but I cannot provide hosting. Where should 
> I put it?
> 
> So here is the script:
> <snip>
> #!/bin/sh
> BASE=/var/cache
> USE_COLORS=yes
> 
> # end user configuration section
> . /etc/make.globals
> BEFORE=$BASE/ebuild-rsync.before
> AFTER=$BASE/ebuild-rsync.after
> NEW=$BASE/ebuild-rsync.new
> REMOVED=$BASE/ebuild-rsync.removed
> 
> if [ "$USE_COLORS" == "yes" ]; then
>   RED="\033[;31m"
>   GREEN="\033[;32m"
>   NORMAL="\033[m"
> fi
> 
> function portagetree () {
>   find $PORTDIR -type d -mindepth 2 -maxdepth 2
> }
> 
> # do it
> portagetree >$BEFORE
> emerge $@ rsync
> portagetree >$AFTER
> diff $BEFORE $AFTER | grep ">" | sed "s/> //g" > $NEW
> diff $BEFORE $AFTER | grep "<" | sed "s/< //g" > $REMOVED
> 
> # cleanup
> rm $BEFORE $AFTER
> 
> # display new ebuilds
> if ! diff -q $NEW /dev/null >/dev/null; then
>   echo
>   echo New ebuilds:
>   for i in $(cat $NEW); do
>    . $(ls $i/*.ebuild --sort=time | head -n 1)
>    echo -e $GREEN${i##$PORTDIR/}$NORMAL: $DESCRIPTION
>   done
> fi
> 
> # display removed ebuilds
> if ! diff -q $REMOVED /dev/null >/dev/null; then
>   echo
>   echo Removed ebuilds:
>    for i in $(cat $REMOVED); do
>       echo -e $RED${i##$PORTDIR/}$NORMAL
>    done
> fi
> </snip>

Since /usr/portage/incoming/apmd/  does not have an ebuild file the script
fails with:

ls: /usr/portage/incoming/apmd/*.ebuild: No such file or directory
./nuebuild: .: filename argument required


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [gentoo-dev] new package notification
  2002-07-27 13:01           ` mikepolniak
@ 2002-07-27 14:05             ` Marko Mikulicic
  2002-07-27 16:12               ` mikepolniak
  0 siblings, 1 reply; 28+ messages in thread
From: Marko Mikulicic @ 2002-07-27 14:05 UTC (permalink / raw
  To: mikepolniak; +Cc: gentoo-dev

mikepolniak wrote:
> On Fri, 26 Jul 2002 22:50:41 +0200
> Marko Mikulicic <marko@seul.org> wrote:
> 
> 

> 
> Since /usr/portage/incoming/apmd/  does not have an ebuild file the script
> fails with:
> 
> ls: /usr/portage/incoming/apmd/*.ebuild: No such file or directory
> ./nuebuild: .: filename argument required

the script should go on.
It will report the error but it should go on.
I know it's annoying, but I don't know if its worth
complicating the script just for handling a exceptional condition
which should not be there. (If the program doesn't abort)
  However I have the patch:

<snip>
** /usr/local/bin/emerge-rsync 2002-07-26 22:47:41.000000000 +0200
--- emerge-rsync        2002-07-27 16:00:39.000000000 +0200
***************
*** 34,40 ****
    echo
    echo New ebuilds:
    for i in $(cat $NEW); do
!   . $(ls $i/*.ebuild --sort=time | head -n 1)
     echo -e $GREEN${i##$PORTDIR/}$NORMAL: $DESCRIPTION
    done
   fi
--- 34,42 ----
    echo
    echo New ebuilds:
    for i in $(cat $NEW); do
!   DESCRIPTION=""
!   EBUILD=$(ls $i/*.ebuild --sort=time  2>/dev/null | head -n 1)
!   [ -z "$EBUILD" ] || . $EBUILD
     echo -e $GREEN${i##$PORTDIR/}$NORMAL: $DESCRIPTION
    done
   fi
</snip>

But I would like to hear opinions.
Is it normal to have directories with no *.emerge?
Should it report an error message or simply discard the description
(as the patch does) ?
Clean is nice, but real world is ugly :-)

Marko



^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [gentoo-dev] new package notification
  2002-07-27 14:05             ` Marko Mikulicic
@ 2002-07-27 16:12               ` mikepolniak
  2002-07-27 20:40                 ` Marko Mikulicic
  0 siblings, 1 reply; 28+ messages in thread
From: mikepolniak @ 2002-07-27 16:12 UTC (permalink / raw
  To: gentoo-dev; +Cc: marko

On Sat, 27 Jul 2002 16:05:58 +0200
Marko Mikulicic <marko@seul.org> wrote:

> mikepolniak wrote:
> > On Fri, 26 Jul 2002 22:50:41 +0200
> > Marko Mikulicic <marko@seul.org> wrote:
> > 
> > 
> 
> > 
> > Since /usr/portage/incoming/apmd/  does not have an ebuild file the script
> > fails with:
> > 
> > ls: /usr/portage/incoming/apmd/*.ebuild: No such file or directory
> > ./nuebuild: .: filename argument required
> 
> the script should go on.
> It will report the error but it should go on.
> I know it's annoying, but I don't know if its worth
> complicating the script just for handling a exceptional condition
> which should not be there. (If the program doesn't abort)
>   However I have the patch:
> 
> <snip>
> ** /usr/local/bin/emerge-rsync 2002-07-26 22:47:41.000000000 +0200
> --- emerge-rsync        2002-07-27 16:00:39.000000000 +0200
> ***************
> *** 34,40 ****
>     echo
>     echo New ebuilds:
>     for i in $(cat $NEW); do
> !   . $(ls $i/*.ebuild --sort=time | head -n 1)
>      echo -e $GREEN${i##$PORTDIR/}$NORMAL: $DESCRIPTION
>     done
>    fi
> --- 34,42 ----
>     echo
>     echo New ebuilds:
>     for i in $(cat $NEW); do
> !   DESCRIPTION=""
> !   EBUILD=$(ls $i/*.ebuild --sort=time  2>/dev/null | head -n 1)
> !   [ -z "$EBUILD" ] || . $EBUILD
>      echo -e $GREEN${i##$PORTDIR/}$NORMAL: $DESCRIPTION
>     done
>    fi
> </snip>
> 
> But I would like to hear opinions.
> Is it normal to have directories with no *.emerge?
> Should it report an error message or simply discard the description
> (as the patch does) ?
> Clean is nice, but real world is ugly :-)
> 
I did  echo "$i/*.ebuild does not exist" for the error message.

I also like your idea to EXCLUDE paths since e.g. i dont use gnome or kde and
would exclude their listing.


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [gentoo-dev] new package notification
  2002-07-27 16:12               ` mikepolniak
@ 2002-07-27 20:40                 ` Marko Mikulicic
  0 siblings, 0 replies; 28+ messages in thread
From: Marko Mikulicic @ 2002-07-27 20:40 UTC (permalink / raw
  To: mikepolniak; +Cc: gentoo-dev

mikepolniak wrote:

> 
> I did  echo "$i/*.ebuild does not exist" for the error message.

nothing easiear:

yust fill DESCRIPTION:
DESCRIPTION="$i/*.ebuild ${RED}does not exist$NORMAL"

> 
> I also like your idea to EXCLUDE paths since e.g. i dont use gnome or kde and
> would exclude their listing.

I will make it in the next version :-)
It should read a config file. "/etc/emerge-rsync.conf".
I don't like to pollute /etc just for a simple configuration like 
"EXCLUDE". Modifying the bin is not an option.
  When I collect some more features request I will implement them
all in once.
  For now it's better to keep it simple.
I want to be sure that errors like the one you reported
does not repeat. After a bit testing will put in
other features.

Marko






^ permalink raw reply	[flat|nested] 28+ messages in thread

* [gentoo-dev] Re: [gentoo-user] new package notification
  2002-07-26 16:44 [gentoo-dev] new package notification Gregg
                   ` (2 preceding siblings ...)
  2002-07-26 17:39 ` [gentoo-dev] Re: [gentoo-user] " Robert Cole
@ 2002-07-27 23:44 ` Hannes Mehnert
  2002-07-28  6:28   ` Gregg
  2002-09-10 16:30 ` [gentoo-dev] " Matthew Kennedy
  4 siblings, 1 reply; 28+ messages in thread
From: Hannes Mehnert @ 2002-07-27 23:44 UTC (permalink / raw
  To: Gregg; +Cc: gentoo-dev, gentoo-user

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

> Any ideas?  Anyone already have this working?

KPortageMaster has this already, it greps "ebuild" from the output
of rsync. Feel free to test it, version 0.3 is in portage, version
0.4.1 is on http://user.cs.tu-berlin.de/~mehnert/
It's a gui for portage, based on kde/qt.

Hannes Mehnert

GPG-Fingerprint: B3BB E539 F6BF 6942 1492  3ACF 45CB 8D97 3881 8D1C
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9QzBoRcuNlziBjRwRAo0EAJ9BWPvxOspd2cn5gvuUs5xQKAFd1ACePaTi
7pBOzg+zrJPlfMcHRM+DOeQ=
=Iw9l
-----END PGP SIGNATURE-----


^ permalink raw reply	[flat|nested] 28+ messages in thread

* [gentoo-dev] Re: [gentoo-user] new package notification
  2002-07-27 23:44 ` Hannes Mehnert
@ 2002-07-28  6:28   ` Gregg
  2002-07-28 10:24     ` Hannes Mehnert
  0 siblings, 1 reply; 28+ messages in thread
From: Gregg @ 2002-07-28  6:28 UTC (permalink / raw
  To: hannes; +Cc: gregg, gentoo-dev, gentoo-user

That is great for the users who use X.  Glad to hear KPortageMaster is
coming along and already has the features I am looking for, but none of my
servers running gentoo have X on them.

Gregg


> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi,
>
>> Any ideas?  Anyone already have this working?
>
> KPortageMaster has this already, it greps "ebuild" from the output of
> rsync. Feel free to test it, version 0.3 is in portage, version 0.4.1 is
> on http://user.cs.tu-berlin.de/~mehnert/
> It's a gui for portage, based on kde/qt.
>
> Hannes Mehnert
>
> GPG-Fingerprint: B3BB E539 F6BF 6942 1492  3ACF 45CB 8D97 3881 8D1C
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.0.7 (GNU/Linux)
>
> iD8DBQE9QzBoRcuNlziBjRwRAo0EAJ9BWPvxOspd2cn5gvuUs5xQKAFd1ACePaTi
> 7pBOzg+zrJPlfMcHRM+DOeQ=
> =Iw9l
> -----END PGP SIGNATURE-----
> _______________________________________________
> gentoo-user mailing list
> gentoo-user@gentoo.org
> http://lists.gentoo.org/mailman/listinfo/gentoo-user





^ permalink raw reply	[flat|nested] 28+ messages in thread

* [gentoo-dev] Re: [gentoo-user] new package notification
  2002-07-28  6:28   ` Gregg
@ 2002-07-28 10:24     ` Hannes Mehnert
  0 siblings, 0 replies; 28+ messages in thread
From: Hannes Mehnert @ 2002-07-28 10:24 UTC (permalink / raw
  To: Gregg; +Cc: gentoo-dev, gentoo-user

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sun, Jul 28, 2002 at 01:28:52AM -0500, Gregg wrote:
> That is great for the users who use X.  Glad to hear KPortageMaster is
> coming along and already has the features I am looking for, but none of my
> servers running gentoo have X on them.

Right, we are planning to let KPortageMaster work over a ssh connection,
simply start it at Your workstation and administrate Your servers ;).

Hannes Mehnert

GPG-Fingerprint: B3BB E539 F6BF 6942 1492  3ACF 45CB 8D97 3881 8D1C
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9Q8ZLRcuNlziBjRwRArboAKDGZ+2WYGskbsVv1zrHkcQ887ulPACfYi7d
iLprMPc/9gHjLPGi5iGFBRM=
=zFvT
-----END PGP SIGNATURE-----


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [gentoo-dev] [gentoo-user] new package notification
  2002-07-26 16:44 [gentoo-dev] new package notification Gregg
                   ` (3 preceding siblings ...)
  2002-07-27 23:44 ` Hannes Mehnert
@ 2002-09-10 16:30 ` Matthew Kennedy
  2002-09-11  6:45   ` Marko Mikulicic
  2002-09-13 10:43   ` Alexander Futasz
  4 siblings, 2 replies; 28+ messages in thread
From: Matthew Kennedy @ 2002-09-10 16:30 UTC (permalink / raw
  To: gentoo-dev

Gregg <gregg@sc.am> writes:

> I have mentioned this a couple times to usually no response.  I feel that
> it is an important feature , I was hoping to get some sort of response to
> this as to  how it should be done, or a response saying "we are already
> working on that". Either way is fine by me :)
> 

    #!/bin/bash
    
    history=/tmp/package.history
    
    available_packages() {
        ( qpkg -I -nc && qpkg -U -nc ) |uniq |sort
    }
    
    if [ -f ${history} ]
    then
        available_packages >${history}.new
        diff ${history} ${history}.new
        mv -f ${history}.new ${history}
    else
        echo "First time run. Building history..."
        available_packages >${history}
    fi
    
-- 
Matthew Kennedy
Gentoo Linux Developer
Bugs go to http://bugs.gentoo.org!

Key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x6C25B0A2
Finger Print:  0C61 0CBC C669 5F26 8DBF  006D FBAB 30EA 6C25 B0A2



^ permalink raw reply	[flat|nested] 28+ messages in thread

* [gentoo-dev] Re: [gentoo-user] new package notification
       [not found] <27987.535033799$1031661408@news.gmane.org>
@ 2002-09-11  0:44 ` Mecho Puh
  0 siblings, 0 replies; 28+ messages in thread
From: Mecho Puh @ 2002-09-11  0:44 UTC (permalink / raw
  To: gentoo-dev

Gregg wrote:
> I want to see a list of new packages that are available after an rsync. 
> Not updates to packages that were already there, but new directories in
> the portage tree.
http://gentoo.zhware.net/files/whatsnew.sh
The link to the Gentoo Forum discussion about this is inside the script.





^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [gentoo-dev] [gentoo-user] new package notification
  2002-09-10 16:30 ` [gentoo-dev] " Matthew Kennedy
@ 2002-09-11  6:45   ` Marko Mikulicic
  2002-09-13 10:43   ` Alexander Futasz
  1 sibling, 0 replies; 28+ messages in thread
From: Marko Mikulicic @ 2002-09-11  6:45 UTC (permalink / raw
  To: mkennedy; +Cc: gentoo-dev

Matthew Kennedy wrote:
> Gregg <gregg@sc.am> writes:
> 
> 
>>I have mentioned this a couple times to usually no response.  I feel that
>>it is an important feature , I was hoping to get some sort of response to
>>this as to  how it should be done, or a response saying "we are already
>>working on that". Either way is fine by me :)

I wrote a script that do this some times ago. I have still to fix a 
minor glitch before it's incorporated
in gentoolkit, but it's usable.

<snip filename='emerge-rsync'>
#!/bin/sh
BASE=/var/cache
USE_COLORS=yes

# end user configuration section
. /etc/make.globals
BEFORE=$BASE/ebuild-rsync.before
AFTER=$BASE/ebuild-rsync.after
NEW=$BASE/ebuild-rsync.new
REMOVED=$BASE/ebuild-rsync.removed

if [ "$USE_COLORS" == "yes" ]; then
  RED="\033[;31m"
  GREEN="\033[;32m"
  NORMAL="\033[m"
fi

function portagetree () {
  find $PORTDIR -type d -mindepth 2 -maxdepth 2
}

function inherit {
  true
}

# do it
portagetree >$BEFORE
emerge $@ rsync
portagetree >$AFTER
diff $BEFORE $AFTER | grep ">" | sed "s/> //g" > $NEW
diff $BEFORE $AFTER | grep "<" | sed "s/< //g" > $REMOVED

# cleanup
rm $BEFORE $AFTER

# display new ebuilds
if ! diff -q $NEW /dev/null >/dev/null; then
  echo
  echo New ebuilds:
  for i in $(cat $NEW); do
   DESCRIPTION="$i/*.ebuild ${RED}does not exist$NORMAL"
   EBUILD=$(ls $i/*.ebuild --sort=time  2>/dev/null | head -n 1)
   [ -z "$EBUILD" ] || . $EBUILD
   echo -e $GREEN${i##$PORTDIR/}$NORMAL: $DESCRIPTION
  done
fi

# display removed ebuilds
if ! diff -q $REMOVED /dev/null >/dev/null; then
  echo
  echo Removed ebuilds:
   for i in $(cat $REMOVED); do
      echo -e $RED${i##$PORTDIR/}$NORMAL
   done
fi
</snip>




^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [gentoo-dev] [gentoo-user] new package notification
  2002-09-10 16:30 ` [gentoo-dev] " Matthew Kennedy
  2002-09-11  6:45   ` Marko Mikulicic
@ 2002-09-13 10:43   ` Alexander Futasz
  2002-09-13 13:49     ` Matthew Kennedy
  1 sibling, 1 reply; 28+ messages in thread
From: Alexander Futasz @ 2002-09-13 10:43 UTC (permalink / raw
  To: Matthew Kennedy; +Cc: gentoo-dev

On 10 Sep 2002 11:30:38 -0500
Matthew Kennedy <mkennedy@gentoo.org> wrote:

>     #!/bin/bash
>     
>     history=/tmp/package.history
>     
>     available_packages() {
>         ( qpkg -I -nc && qpkg -U -nc ) |uniq |sort
>     }
>     
>     if [ -f ${history} ]
>     then
>         available_packages >${history}.new
>         diff ${history} ${history}.new
>         mv -f ${history}.new ${history}
>     else
>         echo "First time run. Building history..."
>         available_packages >${history}
>     fi

-     ( qpkg -I -nc && qpkg -U -nc ) |uniq |sort
+     ( qpkg -I -nc && qpkg -U -nc ) |sort |uniq

$ whatis uniq 
uniq                 (1)  - remove duplicate lines from a sorted file

-alex


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [gentoo-dev] [gentoo-user] new package notification
  2002-09-13 10:43   ` Alexander Futasz
@ 2002-09-13 13:49     ` Matthew Kennedy
  2002-09-13 15:49       ` Alexander Futasz
  0 siblings, 1 reply; 28+ messages in thread
From: Matthew Kennedy @ 2002-09-13 13:49 UTC (permalink / raw
  To: gentoo-dev

Alexander Futasz <acid.punk@gmx.net> writes:

> On 10 Sep 2002 11:30:38 -0500
> Matthew Kennedy <mkennedy@gentoo.org> wrote:
> 
> >     #!/bin/bash
> >     
> >     history=/tmp/package.history
> >     
> >     available_packages() {
> >         ( qpkg -I -nc && qpkg -U -nc ) |uniq |sort
> >     }
> >     
> >     if [ -f ${history} ]
> >     then
> >         available_packages >${history}.new
> >         diff ${history} ${history}.new
> >         mv -f ${history}.new ${history}
> >     else
> >         echo "First time run. Building history..."
> >         available_packages >${history}
> >     fi
> 
> -     ( qpkg -I -nc && qpkg -U -nc ) |uniq |sort
> +     ( qpkg -I -nc && qpkg -U -nc ) |sort |uniq
> 
> $ whatis uniq 
> uniq                 (1)  - remove duplicate lines from a sorted file
> 

Doh. And here's another improvement:

   available_packages() {
       qpkg -U -nc | sort | uniq
   }

(Since you already know about the packages you have installed and thus
wouldn't be interested in them)

Matt

-- 
Matthew Kennedy
Gentoo Linux Developer
Bugs go to http://bugs.gentoo.org!

Key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x6C25B0A2
Finger Print:  0C61 0CBC C669 5F26 8DBF  006D FBAB 30EA 6C25 B0A2



^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [gentoo-dev] [gentoo-user] new package notification
  2002-09-13 13:49     ` Matthew Kennedy
@ 2002-09-13 15:49       ` Alexander Futasz
  2002-09-13 22:33         ` Matthew Kennedy
  0 siblings, 1 reply; 28+ messages in thread
From: Alexander Futasz @ 2002-09-13 15:49 UTC (permalink / raw
  To: Matthew Kennedy; +Cc: gentoo-dev

On 13 Sep 2002 08:49:13 -0500
Matthew Kennedy <mkennedy@gentoo.org> wrote:
> Alexander Futasz <acid.punk@gmx.net> writes:
> > -     ( qpkg -I -nc && qpkg -U -nc ) |uniq |sort
> > +     ( qpkg -I -nc && qpkg -U -nc ) |sort |uniq
> > 
> > $ whatis uniq 
> > uniq                 (1)  - remove duplicate lines from a sorted
> > file
> 
> Doh. And here's another improvement:
> 
>    available_packages() {
>        qpkg -U -nc | sort | uniq
>    }
> 
> (Since you already know about the packages you have installed and thus
> wouldn't be interested in them)

Hehe and actually you can then drop the whole sort and uniq thing
completely, qpkg sorts and everything is uniq anyway, i think. ;)
I looked and found that '( qpkg -I -nc && qpkg -U -nc ) |sort |uniq' and
'qpkg -U -nc' will result in the same output. It would be more
interesing to get version numbers from the qpkg output. Dunno if qpkg
can do that.

-alex


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [gentoo-dev] [gentoo-user] new package notification
  2002-09-13 15:49       ` Alexander Futasz
@ 2002-09-13 22:33         ` Matthew Kennedy
  0 siblings, 0 replies; 28+ messages in thread
From: Matthew Kennedy @ 2002-09-13 22:33 UTC (permalink / raw
  To: gentoo-dev

Alexander Futasz <acid.punk@gmx.net> writes:

> On 13 Sep 2002 08:49:13 -0500
> Matthew Kennedy <mkennedy@gentoo.org> wrote:
> > Alexander Futasz <acid.punk@gmx.net> writes:
> > > -     ( qpkg -I -nc && qpkg -U -nc ) |uniq |sort
> > > +     ( qpkg -I -nc && qpkg -U -nc ) |sort |uniq
> > > 
> > > $ whatis uniq 
> > > uniq                 (1)  - remove duplicate lines from a sorted
> > > file
> > 
> > Doh. And here's another improvement:
> > 
> >    available_packages() {
> >        qpkg -U -nc | sort | uniq
> >    }
> > 
> > (Since you already know about the packages you have installed and thus
> > wouldn't be interested in them)
> 
> Hehe and actually you can then drop the whole sort and uniq thing
> completely, qpkg sorts and everything is uniq anyway, i think. ;)
> I looked and found that '( qpkg -I -nc && qpkg -U -nc ) |sort |uniq' and
> 'qpkg -U -nc' will result in the same output. It would be more
> interesing to get version numbers from the qpkg output. Dunno if qpkg
> can do that.

Yeah you could work that in somehow. qpkg -v shows version numbers.

-- 
Matthew Kennedy
Gentoo Linux Developer
Bugs go to http://bugs.gentoo.org!

Key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x6C25B0A2
Finger Print:  0C61 0CBC C669 5F26 8DBF  006D FBAB 30EA 6C25 B0A2



^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2002-09-13 22:28 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-07-26 16:44 [gentoo-dev] new package notification Gregg
2002-07-26 16:44 ` [gentoo-dev] [gentoo-user] " Gregg
2002-07-26 17:20 ` [gentoo-dev] " Alexander Gretencord
2002-07-26 18:50   ` Gregg
2002-07-26 19:54     ` Marko Mikulicic
2002-07-26 20:03       ` Gregg
2002-07-26 20:50         ` Marko Mikulicic
2002-07-26 21:40           ` Alexander Gretencord
2002-07-26 21:53             ` Marko Mikulicic
2002-07-26 23:05               ` Gregg
2002-07-27  0:17               ` Karl Trygve Kalleberg
2002-07-27 13:01           ` mikepolniak
2002-07-27 14:05             ` Marko Mikulicic
2002-07-27 16:12               ` mikepolniak
2002-07-27 20:40                 ` Marko Mikulicic
     [not found]     ` <3D41A376.4060305@seul.org>
2002-07-26 20:00       ` Gregg
2002-07-26 17:39 ` [gentoo-dev] Re: [gentoo-user] " Robert Cole
2002-07-26 17:39   ` Robert Cole
2002-07-27 23:44 ` Hannes Mehnert
2002-07-28  6:28   ` Gregg
2002-07-28 10:24     ` Hannes Mehnert
2002-09-10 16:30 ` [gentoo-dev] " Matthew Kennedy
2002-09-11  6:45   ` Marko Mikulicic
2002-09-13 10:43   ` Alexander Futasz
2002-09-13 13:49     ` Matthew Kennedy
2002-09-13 15:49       ` Alexander Futasz
2002-09-13 22:33         ` Matthew Kennedy
     [not found] <27987.535033799$1031661408@news.gmane.org>
2002-09-11  0:44 ` [gentoo-dev] " Mecho Puh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox