Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow tito build without .tito directory #474

Merged
merged 1 commit into from
Jan 4, 2024

Conversation

FrostyX
Copy link
Member

@FrostyX FrostyX commented Dec 28, 2023

Fix #472

@FrostyX FrostyX force-pushed the without-init branch 2 times, most recently from 7e2ef33 to 8ed0932 Compare December 28, 2023 07:52
self.config = ConfigLoader(package_name, build_dir, tag).load()
self.config = self.initial_config
if not self.options.without_init:
self.config = ConfigLoader(package_name, build_dir, tag).load()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be:

        if self.options.without_init:
            self.config = self.initial_config
        else:
            self.config = ConfigLoader(package_name, build_dir, tag).load()

And the error message of ConfigLoader() should be altered and when it prints:

ERROR: Unable to locate branch configuration: /home/msuchy/fedora/git/gnome-logs/rel-eng/tito.props
Please run 'tito init'

We should add a line:

or run tito --without-init

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good points, thank you. Updated.

Copy link
Member

@xsuchy xsuchy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@xsuchy xsuchy merged commit 4fb18d4 into rpm-software-management:master Jan 4, 2024
11 checks passed
@praiskup
Copy link
Member

praiskup commented Jan 5, 2024

Why we can't simply do this even without an explicit --without-init?

@FrostyX
Copy link
Member Author

FrostyX commented Jan 5, 2024

Why we can't simply do this even without an explicit --without-init?

I don't have a strong opinion on this. My reasoning was that running Tito without init, albeit very useful in some cases, it is still a non-typical usage. And I wanted to communicate that to users.

But there is no hard requirement for this, we can make this behavior implicit if we want to.

@xsuchy
Copy link
Member

xsuchy commented Jan 5, 2024

Why we can't simply do this even without an explicit --without-init?

Because this way user has to explicitly admit that he is operating with default setting of Tito project. And not with the setting of the git project.
If it is author, then it encourage him to create configuration (and study what he can do with the configuration).

@praiskup
Copy link
Member

praiskup commented Jan 5, 2024

I don't know. If it is possible, and we can issue a warning to "push the user" toward a useful configuration (while the option could silence the warnings), the explicit option only complicates integrating this feature into higher level tools like Copr (special option needs to be implemented just for this).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make tito build --srpm work without any .tito/ configuration
3 participants