[Rpm-maint] [rpm-software-management/rpm] Use explicit default branch in %autosetup -S git (PR #2121)

Miro Hrončok notifications at github.com
Tue Aug 2 11:18:01 UTC 2022


This still fails with edk2 in Fedora:

```
%prep
# We needs some special git config options that %%autosetup won't give us.
# We init the git dir ourselves, then tell %%autosetup not to blow it away.
%setup -q -n edk2-%{GITCOMMIT}
git init -q
git config core.whitespace cr-at-eol
git config am.keepcr true
# -T is passed to %%setup to not re-extract the archive
# -D is passed to %%setup to not delete the existing archive dir
%autosetup -T -D -n edk2-%{GITCOMMIT} -S git_am
```


```
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.91NC2v
+ umask 022
+ cd /builddir/build/BUILD
+ cd /builddir/build/BUILD
+ rm -rf edk2-16779ede2d36
+ /usr/lib/rpm/rpmuncompress -x /builddir/build/SOURCES/edk2-16779ede2d36.tar.xz
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd edk2-16779ede2d36
+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ git init -q
+ git config core.whitespace cr-at-eol
+ git config am.keepcr true
+ cd /builddir/build/BUILD
+ cd edk2-16779ede2d36
+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ /usr/bin/git init -q --initial-branch=main
warning: re-init: ignored --initial-branch=main
+ /usr/bin/git config user.name rpm-build
+ /usr/bin/git config user.email '<rpm-build>'
+ /usr/bin/git config gc.auto 0
+ /usr/bin/git add --force .
+ /usr/bin/git commit -q --allow-empty -a --author 'rpm-build <rpm-build>' -m 'edk2-20220526git16779ede2d36 base'
+ /usr/bin/git branch rpm-build
+ /usr/bin/git checkout rpm-build
Switched to branch 'rpm-build'
+ /usr/bin/git branch --set-upstream-to=main
fatal: the requested upstream branch 'main' does not exist
hint: 
hint: If you are planning on basing your work on an upstream
hint: branch that already exists at the remote, you may need to
hint: run "git fetch" to retrieve it.
hint: 
hint: If you are planning to push out a new local branch that
hint: will track its remote counterpart, you may want to use
hint: "git push -u" to set the upstream config as you push.
hint: Disable this message with "git config advice.setUpstreamFailure false"
RPM build errors:
```

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2121#issuecomment-1202349789
You are receiving this because you are subscribed to this thread.

Message ID: <rpm-software-management/rpm/pull/2121/c1202349789 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20220802/63d7796e/attachment.html>


More information about the Rpm-maint mailing list