[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#732255: Bug#773867: missing sources.list



On 2015-01-04, Cyril Brulebois wrote:
> Cyril Brulebois <kibi@debian.org> (2014-12-30):

>> setup_apt_sources is defined in the functions script, and iterates over
>> COMPONENTS to update sources.list accordingly; so this would likely
>> help. Anyway, COMPONENTS is only ever defined/used in functions, so I'm
>> wondering whether it's wise to expose/manipulate it in the main
>> debootstrap script. Additionally, if the sources.list file is the only
>> thing not working without touching COMPONENTS, I'd rather suggest
>> something like the attached, untested patch.

Sounds reasonable...


>> If you'd like to see some progress on this bug report, please test (with
>> regular and foreign architectures) and report back.
>
> So far, only jhcha54008 replied (thanks).
>
> Holger, Vagrant, any chance you could give it a shot so that I know
> where to draw the line?
...
>> diff --git a/functions b/functions
>> index 674d649..bf999f1 100644
>> --- a/functions
>> +++ b/functions
>> @@ -949,9 +949,11 @@ mv_invalid_to () {
>>  
>>  setup_apt_sources () {
>>  	mkdir -p "$TARGET/etc/apt"
>> +	# Cope with the foreign case where COMPONENTS would be empty:
>> +	sources_components="${COMPONENTS:-$USE_COMPONENTS}"
>>  	for m in "$@"; do
>>  		local cs=""
>> -		for c in $COMPONENTS; do
>> +		for c in $sources_components; do
>>  			local path="dists/$SUITE/$c/binary-$ARCH/Packages"
>>  			local pkgdest="$TARGET/$($DLDEST pkg "$SUITE" "$c" "$ARCH" "$m" "$path")"
>>  			if [ -e "$pkgdest" ]; then cs="$cs $c"; fi
>> -- 
>> 2.1.4

I can confirm this patch worked for me running on an amd64 host in
several cases:

  # running a "foreign" chroot and manually executing second-stage:
  sudo debootstrap --foreign --arch=i386 jessie jessie-i386 http://ftp.us.debian.org/debian
  sudo chroot ./jessie-i386 /debootstrap/debootstrap --second-stage

  # native install:
  sudo debootstrap --arch=amd64 jessie jessie-amd64 http://ftp.us.debian.org/debian

  # foreign chroot with qemu-debootstrap wrapper script:
  sudo qemu-debootstrap --arch=armhf jessie jessie-armhf http://ftp.us.debian.org/debian

The resulting chroots included an appropriately populated
/etc/apt/sources.list.


live well,
  vagrant

Attachment: signature.asc
Description: PGP signature


Reply to: