Add subroutines to replace functionality from Emdebian::Tools in shell scripts. Drop Emdebian::Tools dependency. (LP: #531143)
git-svn-id: http://emdebian.org/svn/current@6803 563faec7-e20c-0410-992a-a66f704d0ccd
This commit is contained in:
parent
1cf62effa3
commit
0b6329aaf9
6 changed files with 65 additions and 27 deletions
4
debian/changelog
vendored
4
debian/changelog
vendored
|
@ -3,8 +3,10 @@ emdebian-rootfs (2.0.7) unstable; urgency=low
|
||||||
* [INTL:pt] Updated Portuguese program output translation
|
* [INTL:pt] Updated Portuguese program output translation
|
||||||
(Closes: #572929)
|
(Closes: #572929)
|
||||||
* Handle relative directories from the command line.
|
* Handle relative directories from the command line.
|
||||||
|
* Add subroutines to replace functionality from Emdebian::Tools
|
||||||
|
in shell scripts. Drop Emdebian::Tools dependency. (LP: #531143)
|
||||||
|
|
||||||
-- Neil Williams <codehelp@debian.org> Thu, 11 Mar 2010 16:39:36 +0000
|
-- Neil Williams <codehelp@debian.org> Fri, 12 Mar 2010 14:58:01 +0000
|
||||||
|
|
||||||
emdebian-rootfs (2.0.6) unstable; urgency=low
|
emdebian-rootfs (2.0.6) unstable; urgency=low
|
||||||
|
|
||||||
|
|
5
debian/control
vendored
5
debian/control
vendored
|
@ -4,7 +4,8 @@ Priority: extra
|
||||||
Maintainer: Neil Williams <codehelp@debian.org>
|
Maintainer: Neil Williams <codehelp@debian.org>
|
||||||
Uploaders: Wookey <wookey@debian.org>
|
Uploaders: Wookey <wookey@debian.org>
|
||||||
Build-Depends: cdbs, debhelper (>= 5), po4a (>= 0.37.1), po-debconf
|
Build-Depends: cdbs, debhelper (>= 5), po4a (>= 0.37.1), po-debconf
|
||||||
Build-Depends-Indep: devscripts, docbook-xml, docbook-xsl, gnupg, libxml2-utils, xml-core, xsltproc, intltool
|
Build-Depends-Indep: devscripts, docbook-xml, docbook-xsl, gnupg,
|
||||||
|
libxml2-utils, xml-core, xsltproc, intltool
|
||||||
Standards-Version: 3.8.4
|
Standards-Version: 3.8.4
|
||||||
Homepage: http://www.emdebian.org/
|
Homepage: http://www.emdebian.org/
|
||||||
Vcs-Browser: http://buildd.emdebian.org/svn/browser/current/
|
Vcs-Browser: http://buildd.emdebian.org/svn/browser/current/
|
||||||
|
@ -15,7 +16,7 @@ Architecture: all
|
||||||
Depends: ${perl:Depends}, ${misc:Depends}, apt, apt-cross (>= 0.5.0),
|
Depends: ${perl:Depends}, ${misc:Depends}, apt, apt-cross (>= 0.5.0),
|
||||||
binutils-multiarch, debootstrap (>= 1.0.4), dpkg-cross (>= 2.1.0),
|
binutils-multiarch, debootstrap (>= 1.0.4), dpkg-cross (>= 2.1.0),
|
||||||
devscripts, emdebian-archive-keyring, multistrap, pbuilder, sudo, ucf,
|
devscripts, emdebian-archive-keyring, multistrap, pbuilder, sudo, ucf,
|
||||||
libparse-debian-packages-perl, libemdebian-tools-perl
|
libparse-debian-packages-perl
|
||||||
Replaces: emdebian-tools (<= 1.4.3)
|
Replaces: emdebian-tools (<= 1.4.3)
|
||||||
Recommends: gcc
|
Recommends: gcc
|
||||||
Suggests: deb-gview, debian-xcontrol, screen | minicom
|
Suggests: deb-gview, debian-xcontrol, screen | minicom
|
||||||
|
|
|
@ -24,12 +24,12 @@ use Parse::Debian::Packages;
|
||||||
use POSIX qw(locale_h);
|
use POSIX qw(locale_h);
|
||||||
use Locale::gettext;
|
use Locale::gettext;
|
||||||
|
|
||||||
use vars qw/ $progname $ourversion $dstrap $extra @aptsources
|
use vars qw/ $progname $ourversion $dstrap $extra @aptsources $mirror
|
||||||
@archives $deb $cachedir $config_str %packages $retval $str $retries
|
@archives $deb $cachedir $config_str %packages $retval $str $retries
|
||||||
$dir $include $arch $foreign $suite $url $unpack $sourcedir $msg
|
$dir $include $arch $foreign $suite $url $unpack $sourcedir $msg $etcdir
|
||||||
@e $sourcesname $libdir $dpkgdir @debootstrap %suites %components $component $mirror $etcdir
|
@e $sourcesname $libdir $dpkgdir @debootstrap %suites %components
|
||||||
$repo @dirs @touch %sources $section %keys $host $key $value $type
|
$component $repo @dirs @touch %sources $section %keys $host $key $value
|
||||||
$file $config $tidy $noauth $keyring %keyrings $deflist @extrapkgs /;
|
$type $file $config $tidy $noauth $keyring %keyrings $deflist @extrapkgs /;
|
||||||
|
|
||||||
setlocale(LC_MESSAGES, "");
|
setlocale(LC_MESSAGES, "");
|
||||||
textdomain("multistrap");
|
textdomain("multistrap");
|
||||||
|
|
|
@ -6,7 +6,7 @@ set -e
|
||||||
# Note that this script controls tarballs for empdebuild and emsandbox
|
# Note that this script controls tarballs for empdebuild and emsandbox
|
||||||
# pass --cross to set an emsandbox tarball.
|
# pass --cross to set an emsandbox tarball.
|
||||||
#
|
#
|
||||||
# Copyright (C) 2007-2008 Neil Williams <codehelp@debian.org>
|
# Copyright (C) 2007-2010 Neil Williams <codehelp@debian.org>
|
||||||
#
|
#
|
||||||
# This package is free software; you can redistribute it and/or modify
|
# This package is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@ -264,9 +264,9 @@ else # else if not $CROSS
|
||||||
# TODO this should be configurable - emdebian-tools will add a primary later.
|
# TODO this should be configurable - emdebian-tools will add a primary later.
|
||||||
# copy or use the ~/.apt-cross/sources.foo. files.
|
# copy or use the ~/.apt-cross/sources.foo. files.
|
||||||
if [ ! $MIRROR ]; then
|
if [ ! $MIRROR ]; then
|
||||||
URL=`perl -e "use Emdebian::Tools; use Config::Auto; print &get_primary;"`
|
get_primary
|
||||||
if [ ! -z "$URL" ]; then
|
if [ ! -z "$PRIMARY" ]; then
|
||||||
MIRROR="http://${URL}/debian"
|
MIRROR="http://${PRIMARY}/debian"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if [ ! $MIRROR ]; then
|
if [ ! $MIRROR ]; then
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# empbuilderlib : shell library to support building chroots for Emdebian.
|
# empbuilderlib : shell library to support building chroots for Emdebian.
|
||||||
#
|
#
|
||||||
# Copyright (C) 2006-2008 Neil Williams <codehelp@debian.org>
|
# Copyright (C) 2006-2010 Neil Williams <codehelp@debian.org>
|
||||||
# Copyright (C) 2001-2007 Junichi Uekawa
|
# Copyright (C) 2001-2007 Junichi Uekawa
|
||||||
#
|
#
|
||||||
# This package is free software; you can redistribute it and/or modify
|
# This package is free software; you can redistribute it and/or modify
|
||||||
|
@ -196,3 +196,25 @@ function save_aptcrosscache() {
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function get_aptcross_dir ()
|
||||||
|
{
|
||||||
|
if [ -z "$HOME" -o ! -d $HOME ]; then
|
||||||
|
$HOME = "/tmp";
|
||||||
|
fi
|
||||||
|
echo $HOME
|
||||||
|
path="$HOME/.apt-cross";
|
||||||
|
if [ ! -d $path ]; then
|
||||||
|
mkdir $path;
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
function get_primary ()
|
||||||
|
{
|
||||||
|
get_aptcross_dir
|
||||||
|
if [ -f "$path/emsource.conf" ]; then
|
||||||
|
PRIMARY=`grep primary $path/emsource.conf|cut -d: -f2|tr -d ' '`
|
||||||
|
else
|
||||||
|
PRIMARY=`grep primary /etc/emsource.conf|cut -d: -f2|tr -d ' '`
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
39
emrootfslib
39
emrootfslib
|
@ -3,7 +3,7 @@
|
||||||
# This file is POSIX shell, compatible with debootstrap.
|
# This file is POSIX shell, compatible with debootstrap.
|
||||||
# Do not include or reference pbuilder functions or bash code here.
|
# Do not include or reference pbuilder functions or bash code here.
|
||||||
#
|
#
|
||||||
# Copyright (C) 2006-2008 Neil Williams <codehelp@debian.org>
|
# Copyright (C) 2006-2010 Neil Williams <codehelp@debian.org>
|
||||||
#
|
#
|
||||||
# This package is free software; you can redistribute it and/or modify
|
# This package is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@ -24,25 +24,38 @@
|
||||||
# Intended solely for use on the build machine. Do not use these functions
|
# Intended solely for use on the build machine. Do not use these functions
|
||||||
# in second_stage_install !
|
# in second_stage_install !
|
||||||
|
|
||||||
OURVERSION=`perl -e 'use Emdebian::Tools; print &tools_version();'`
|
OURVERSION=`dpkg-query -W -f='${Version}' emdebian-rootfs`
|
||||||
|
|
||||||
|
get_aptcross_dir ()
|
||||||
|
{
|
||||||
|
if [ -z "$HOME" -o ! -d $HOME ]; then
|
||||||
|
$HOME = "/tmp";
|
||||||
|
fi
|
||||||
|
echo $HOME
|
||||||
|
path="$HOME/.apt-cross";
|
||||||
|
if [ ! -d $path ]; then
|
||||||
|
mkdir $path;
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
get_default_arch ()
|
get_default_arch ()
|
||||||
{
|
{
|
||||||
ARCH=`perl -e 'use Debian::DpkgCross; \
|
if [ -f "/etc/dpkg-cross/cross-compile" ]; then
|
||||||
&read_config(); \
|
ARCH=`grep default_arch /etc/dpkg-cross/cross-compile|grep -v '^#'|cut -d'=' -f2`
|
||||||
my $arch = &get_architecture(); \
|
fi
|
||||||
print (qq/None.\n/) if (!$arch); \
|
if [ -z "$ARCH" ]; then
|
||||||
print $arch;';`
|
ARCH="None"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
get_work_dir ()
|
get_work_dir ()
|
||||||
{
|
{
|
||||||
WORKDIR=`perl -e 'use Cwd; use Emdebian::Tools; use Config::Auto; use Debian::DpkgCross; \
|
get_aptcross_dir
|
||||||
&read_config; \
|
if [ -f "$path/emsource.conf" ]; then
|
||||||
my $w = &get_workdir; \
|
WORKDIR=`grep workingdir $path/emsource.conf|cut -d: -f2|tr -d ' '`
|
||||||
$w = cwd if (! -d $w); \
|
else
|
||||||
$w =~ s/\/$//; \
|
WORKDIR=`grep workingdir /etc/emsource.conf|cut -d: -f2|tr -d ' '`
|
||||||
print $w;';`
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
get_work_dir
|
get_work_dir
|
||||||
|
|
Loading…
Reference in a new issue