Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 98167 - symlinks for latest portage snapshots
Summary: symlinks for latest portage snapshots
Status: RESOLVED FIXED
Alias: None
Product: Mirrors
Classification: Unclassified
Component: Feature Request (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Mirror Admins
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-06 17:20 UTC by Robin Johnson
Modified: 2005-07-07 09:31 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2005-07-06 17:20:40 UTC
could you please have a set of symlinks in the snapshots directory that point to the latest files?

eg:
ln -sf portage-DATE.tar.bz2 latest.tar.bz2
ln -sf portage-DATE.tar.bz2.gpgsig  latest.tar.bz2.gpgsig
ln -sf portage-DATE.tar.bz2.md5sum  latest.tar.bz2.md5sum

This makes it much easier to fetch the latest snapshot in places where it's not possible to put the date in the filename.
Comment 1 Kurt Lieber (RETIRED) gentoo-dev 2005-07-07 08:09:47 UTC
done
Comment 2 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2005-07-07 09:02:33 UTC
Your symlinks are dangling and don't work.

You did:
portage-latest.tar.bz2 -> /mnt/distfiles/snapshots/portage-DATE.tar.bz2

The lack of path on the symlink source is important.

Create your symlinks with:
ln -sf portage-DATE.tar.bz2 /mnt/distfiles/snapshots/portage-latest.tar.bz2
ln -sf portage-DATE.tar.bz2.md5sum /mnt/distfiles/snapshots/portage-
latest.tar.bz2.md5sum
ln -sf portage-DATE.tar.bz2.gpgsig /mnt/distfiles/snapshots/portage-
latest.tar.bz2.gpgsig
Comment 3 Kurt Lieber (RETIRED) gentoo-dev 2005-07-07 09:09:15 UTC
Not sure I follow....looking at the script, I added:

#
# create some symlinks
#

/usr/bin/ln -sf ${UPLOAD}${FILENAME} ${UPLOAD}portage-latest.tar.bz2
/usr/bin/ln -sf ${UPLOAD}${FILENAME}.md5sum ${UPLOAD}portage-latest.tar.bz2.md5sum
/usr/bin/ln -sf ${UPLOAD}${FILENAME}.gpgsig ${UPLOAD}portage-latest.tar.bz2.gpgsig

Running a brief test on osprey, it appears to work:

osprey tmp # cd /mnt/distfiles/snapshots/
osprey snapshots # ls -lah |grep portage-latest.tar.bz2
lrwxrwxrwx   1 gmirror   gmirror     49 Jul  7 15:14 portage-latest.tar.bz2 ->
/mnt/distfiles/snapshots/portage-20050706.tar.bz2
lrwxrwxrwx   1 gmirror   gmirror     56 Jul  7 15:14
portage-latest.tar.bz2.gpgsig ->
/mnt/distfiles/snapshots/portage-20050706.tar.bz2.gpgsig
lrwxrwxrwx   1 gmirror   gmirror     56 Jul  7 15:14
portage-latest.tar.bz2.md5sum ->
/mnt/distfiles/snapshots/portage-20050706.tar.bz2.md5sum
osprey snapshots # cp portage-latest.tar.bz2 /tmp/
osprey snapshots # cd /tmp
osprey tmp # ls -alh | grep portage-latest.tar.bz2
-rw-r--r--   1 root      root       19M Jul  7 16:08 portage-latest.tar.bz2


What am I missing?
Comment 4 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2005-07-07 09:14:47 UTC
The links should look like:
lrwxrwxrwx  1 root root       24 Jul  7 08:00 portage-latest.tar.bz2 -> portage-
20050706.tar.bz2
lrwxrwxrwx  1 root root       31 Jul  7 08:12 portage-latest.tar.bz2.gpgsig -> 
portage-20050706.tar.bz2.gpgsig
lrwxrwxrwx  1 root root       31 Jul  7 08:00 portage-latest.tar.bz2.md5sum -> 
portage-20050706.tar.bz2.md5sum

So change the lines in the script to:

/usr/bin/ln -sf ${FILENAME} ${UPLOAD}portage-latest.tar.bz2
/usr/bin/ln -sf ${FILENAME}.md5sum ${UPLOAD}portage-latest.tar.bz2.md5sum
/usr/bin/ln -sf ${FILENAME}.gpgsig ${UPLOAD}portage-latest.tar.bz2.gpgsig

To get rid of the path on the source/target for the symlink.
Comment 5 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2005-07-07 09:16:12 UTC
To demonstrate the problem, go to another machine where the snapshots are NOT 
in /mnt/distfiles/snapshots/, and repeat your "cp portage-latest.tar.bz2 /tmp/" 
test.
Comment 6 Kurt Lieber (RETIRED) gentoo-dev 2005-07-07 09:31:44 UTC
ok -- got it.  The script now looks like:

cd ${UPLOAD}
/usr/bin/ln -sf ${FILENAME} ${UPLOAD}portage-latest.tar.bz2
/usr/bin/ln -sf ${FILENAME}.md5sum ${UPLOAD}portage-latest.tar.bz2.md5sum
/usr/bin/ln -sf ${FILENAME}.gpgsig ${UPLOAD}portage-latest.tar.bz2.gpgsig