[PATCH modular 14/15] jhbuild: Add script for updating moduleset tarball definitions

Dirk Wallenstein halsmit at t-online.de
Mon Mar 7 09:13:41 PST 2011


On Mon, Mar 07, 2011 at 09:02:20AM -0800, Dan Nicholson wrote:
> On Mon, Mar 7, 2011 at 8:37 AM, Dirk Wallenstein <halsmit at t-online.de> wrote:
> > On Mon, Mar 07, 2011 at 08:29:49AM -0800, Dan Nicholson wrote:
> >> On Mon, Mar 7, 2011 at 8:19 AM, Dirk Wallenstein <halsmit at t-online.de> wrote:
> >> > On Sun, Mar 06, 2011 at 09:29:59AM -0800, Dan Nicholson wrote:
> >> >> update-moduleset.sh takes the sha1sum and tarball and updates the module
> >> >> definition in a given moduleset. This should make keeping the stable
> >> >> moduleset easier.
> >> >>
> >> >> Signed-off-by: Dan Nicholson <dbn.lists at gmail.com>
> >> >> ---
> >> >>  update-moduleset.sh |   72 +++++++++++++++++++++++++++++++++++++++++++++++++++
> >> >>  1 files changed, 72 insertions(+), 0 deletions(-)
> >> >>  create mode 100755 update-moduleset.sh
> >> >>
> >> >> diff --git a/update-moduleset.sh b/update-moduleset.sh
> >> >> new file mode 100755
> >> >> index 0000000..7de43fe
> >> >> --- /dev/null
> >> >> +++ b/update-moduleset.sh
> >> >> @@ -0,0 +1,72 @@
> >> >> +#!/bin/sh
> >> >> +
> >> >> +module=
> >> >> +version=
> >> >> +
> >> >> +usage()
> >> >> +{
> >> >> +    cat <<EOF
> >> >> +Usage: `basename $0` MODULESET TARBALL SHA1SUM
> >> >> +
> >> >> +Updates the module associated to TARBALL in MODULESET.
> >> >> +EOF
> >> >> +}
> >> >> +
> >> >> +# check input arguments
> >> >> +moduleset=$1
> >> >> +sha1sum=$2
> >> >> +tarball=$3
> >> >
> >> > This does not correspond with the order in the usage message
> >>
> >> Good catch. I had changed the order so you could just pass in the
> >> output of sha1sum, but forgot to update the usage. Will fix.
> >>
> >> >> +if [ -z "$moduleset" ] || [ -z "$sha1sum" ] || [ -z "$tarball" ]; then
> >> >> +    echo "error: Not enough arguments" >&2
> >> >> +    usage >&2
> >> >> +    exit 1
> >> >> +fi
> >> >> +
> >> >> +# check that the moduleset exists and is writable
> >> >> +if [ ! -w "$moduleset" ]; then
> >> >> +    echo "error: moduleset \"$moduleset\" does not exist or is not writable" >&2
> >> >> +    exit 1
> >> >> +fi
> >> >> +
> >> >> +# we only want the tarball name
> >> >> +tarball=`basename $tarball`
> >> >> +
> >> >> +# pull the module and version from the tarball
> >> >> +module=${tarball%-*}
> >> >> +version=${tarball##*-}
> >> >> +version=${version%.tar*}
> >> >> +
> >> >> +# sometimes the jhbuild id doesn't match the tarball name
> >> >> +module_id=$module
> >> >> +case "$module" in
> >> >> +    util-macros)
> >> >> +     module_id=macros
> >> >> +     ;;
> >> >> +    libXres)
> >> >> +        module_id=libXRes
> >> >> +        ;;
> >> >> +    libxtrans)
> >> >> +        module_id=xtrans
> >> >> +        ;;
> >> >> +    xbitmaps)
> >> >> +        module_id=bitmaps
> >> >> +        ;;
> >> >> +    xcursor-themes)
> >> >> +        module_id=cursors
> >> >> +        ;;
> >> >
> >> > Shouldn't libpthread-stubs and xorg-server be translated, too?
> >>
> >> This seems to have a few errors. There's also xproto vs. x11proto that
> >> I forgot about. Also, xtrans vs. libxtrans is backwards since you
> >> would pass the script xtrans-x.y.z.tar.gz. The libXres/libXRes we may
> >> just want to fix in the module file, but that's for another day.
> >>
> >> Do you know any other tarball vs. module name mismatches?
> >
> > I haven't checked every font after the renaming, but this is a list I
> > used once for creating a tarball config for xjh.
> >
> > # A dictionary mapping package name to repo-basename as used on fd.o
> > ModuleIdTranslation = {
> >  'font-adobe-100dpi' : 'adobe-100dpi',
> >  'font-adobe-75dpi' : 'adobe-75dpi',
> >  'font-adobe-utopia-100dpi' : 'adobe-utopia-100dpi',
> >  'font-adobe-utopia-75dpi' : 'adobe-utopia-75dpi',
> >  'font-adobe-utopia-type1' : 'adobe-utopia-type1',
> >  'font-alias' : 'alias',
> >  'font-arabic-misc' : 'arabic-misc',
> >  'font-bh-100dpi' : 'bh-100dpi',
> >  'font-bh-75dpi' : 'bh-75dpi',
> >  'font-bh-lucidatypewriter-100dpi' : 'bh-lucidatypewriter-100dpi',
> >  'font-bh-lucidatypewriter-75dpi' : 'bh-lucidatypewriter-75dpi',
> >  'font-bh-ttf' : 'bh-ttf',
> >  'font-bh-type1' : 'bh-type1',
> >  'font-bitstream-100dpi' : 'bitstream-100dpi',
> >  'font-bitstream-75dpi' : 'bitstream-75dpi',
> >  'font-bitstream-speedo' : 'bitstream-speedo',
> >  'font-bitstream-type1' : 'bitstream-type1',
> >  'font-cronyx-cyrillic' : 'cronyx-cyrillic',
> >  'font-cursor-misc' : 'cursor-misc',
> >  'font-daewoo-misc' : 'daewoo-misc',
> >  'font-dec-misc' : 'dec-misc',
> >  'font-ibm-type1' : 'ibm-type1',
> >  'font-isas-misc' : 'isas-misc',
> >  'font-jis-misc' : 'jis-misc',
> >  'font-micro-misc' : 'micro-misc',
> >  'font-misc-cyrillic' : 'misc-cyrillic',
> >  'font-misc-ethiopic' : 'misc-ethiopic',
> >  'font-misc-meltho' : 'misc-meltho',
> >  'font-misc-misc' : 'misc-misc',
> >  'font-mutt-misc' : 'mutt-misc',
> >  'font-schumacher-misc' : 'schumacher-misc',
> >  'font-screen-cyrillic' : 'screen-cyrillic',
> >  'font-sony-misc' : 'sony-misc',
> >  'font-sun-misc' : 'sun-misc',
> >  'font-util' : 'util',
> >  'font-winitzki-cyrillic' : 'winitzki-cyrillic',
> >  'font-xfree86-type1' : 'xfree86-type1',
> >  'libXres' : 'libXRes',
> >  'libdrm' : 'drm',
> >  'libpthread-stubs' : 'pthread-stubs',
> >  'mesa-demos' : 'demos',
> >  'util-macros' : 'macros',
> >  'xbitmaps' : 'bitmaps',
> >  'xcb-proto' : 'proto',
> >  'xcb-util' : 'util',
> >  'xcursor-themes' : 'cursors',
> >  'xorg-server' : 'xserver',
> >  'xtrans' : 'libxtrans',
> > }
> 
> I just did this with my current xorg-7.6.modules:
> 
> $ jhbuild -m xorg-7.6.modules info | sed -n 's/^Name: \(.*\)/\1/p' >
> module-names
> $ jhbuild -m xorg-7.6.modules info | sed -n
> '/^URL:/s,.*/\(.*\)-[^-]*,\1,p' > tarball-names
> $ while read p; do grep -q "^${p}$" module-names || echo "$p not
> found"; done < tarball-names
> xorg-server not found
> util-macros not found
> libXres not found
> xtrans not found
> xbitmaps not found
> MesaLib not found
> xcursor-themes not found
> libpthread-stubs not found
> xproto not found
> 
> So, it seems I got all the font modules renamed correctly, but missed
> a few others. Fixing now.

Then the fonts all match -- that's really good.

-- 
Greetings,
Dirk


More information about the xorg-devel mailing list