bugGNU GRUB - Bugs: bug #66357, Bootstrap script clone gnulib...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #66357: Bootstrap script clone gnulib always with full history.

Submitter:  hetii <hetii>
Submitted:  Sat 19 Oct 2024 05:10:58 PM UTC
   
 
Category:  Compilation Severity:  Major
Priority:  5 - Normal Item Group:  Software Error
Status:  None Privacy:  Public
Assigned to:  None Originator Name: 
Open/Closed:  Open Release:  Git master
Release:  Reproducibility:  Every Time
Planned Release:  None

Sat 19 Oct 2024 05:10:58 PM UTC, original submission:  

Hello.

I notice that original bootstrap script grep by '--depth' parameter to check if git is able clone gnulib in shallow mode.

eg:
        git clone -h 2>&1 | grep -- --depth > /dev/null && shallow='--depth 2'
        git fetch -h 2>&1 | grep -- --depth > /dev/null && shallow='--depth 2'

This checks is always false for current git version at least in ubuntu images as the argument seams to be now:

        --[no-]depth <depth>  deepen history of shallow clone

As a result, gnulib is always cloned with full history (139MB).

For workaround I use sed to use regex instead.

        sed -i -e s/'-- --depth'/'-E -- \'\''--\(\\[no-\\]\)?depth'\'/g bootstrap

Then, the original lines are change to:
        git clone -h 2>&1 | grep -E -- '--(\[no-\])?depth' > /dev/null && shallow='--depth 2'
        git fetch -h 2>&1 | grep -E -- '--(\[no-\])?depth' > /dev/null && shallow='--depth 2'

Now the grep regex support '--depth' as well as '--[no-]depth'.

By this small change gnulib size is reduced to 84MB and clone a bit faster.

I'm only not sure why shallow is set to '--depth 2' instead '--depth 1' by default.

Regards.

hetii <hetii>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by hetii (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.15-e6e5.
    Corresponding source code