-
Notifications
You must be signed in to change notification settings - Fork 4
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
Have option to *not* upload when using cpan2aur --check #19
Comments
How would you envision the user experience to be? Would the script pause to let you check the package in another terminal? Would the script open up a shell to poke around? Would this be tedious when many packages are being checked? Consider how it would impact people who don't want to check. Just curious. I consider making a good and simple interface more difficult than the coding. In any case I'm more than happy to let you fix it how you want it. I made cpan2aur for myself and didn't know if anyone used it. I also have another package generator called genpkg that I created to deal with deficiencies in cpan2aur. I'm trying to get it in shape to where others can use it more easily and have been using it myself instead of cpan2aur/C::D::A. |
I was thinking just adding a --noupload option to --check that would just return from update_if_old right before upload_pkgdir if set. It shouldn't cause any noticeable changes to anyone currently using it. As for someone with a lot of packages (and it looks like I'm going to end up with a lot because perl doesn't seem to be getting much love) it would just be broken up into a two step process: cpan2aur --check --noupdate perl-* # run tests, etc. for i in perl-*; do cpan2aur --upload $i ; done |
Ah okay. In principle I don't like adding more options to solve a problem. Smells too much like feature creep. The less options the better IMO and cpan2aur already has alot. Could you just make --check only upload if --upload is explicitly specified? That way cpan2aur --check will only build packages that are OOD. and cpan2aur --check --upload will upload packages too. That might actually make more sense and be more predictable behavior in any case. cpan2aur --upload on everything is kind of wasteful because it will upload everything even if it is not OOD, btw. I suppose it doesn't matter much in the grand scheme of things. |
I don't see any technical issues with doing --check --upload instead. But it would break the way the program currently handles this and might cause some users some issues. I hadn't thought about the uploading everything problem ... not sure how to resolve this. Ideally, cpan2aur --upload would check the current PKGBUILD against what's on AUR and refuse to upload it if they matched, or the local copy was an earlier version. Perhaps --check could drop a temp file in the dir that --upload could use, but now I am getting into feature creep... If genpkg is more mature this may be a non-issue ... |
genpkg actually does less. There is no AUR uploading or version checking but it generates packages better I think. Yes changing the logic would confuse people but if they are paying attention they will probably figure it out. It's always possible to throw in a warning message or something when only --check is used. |
Any progress? Want help? Change your mind? |
I'm sorry ... a few days after I made this request I hit the perfect storm (work, family and personal tasks) and frankly forgot about this until your bump yesterday. I just committed and pushed the change I originally experimented with. You can see them at http://goo.gl/wyWWH . After a quick test this morning I see three problems I'm not quite sure how to resolve.
I'll keep working on it, but my tuits are sparse atm. |
That's alright I was just curious. I wanted to be encouraging. I don't have much free time either and just looked over this before bed.
Try to keep the style consistent. I noticed you use two-space indent and have the else on the same line as if's closing bracket. Honestly my style has changed since I wrote cpan2aur and I don't like the style anymore but I would like to keep it consistent. |
:] I am encourage-able. I traced execution through ... pkrel is never incremented, but I don't know enough about the internals yet to figure out why. I added the check to the file type handling, but I haven't actually run anything against that. As for style, I'm not sure how I missed the else setup. I try to match the surrounding code. As for the spacing, well, I was just being lazy. Sorry about that. I notice you have the ALPM as well. I think I might just use cpan2aur as is until I can get a better understanding of ALPM and WWW::AUR and hack something together (I'm not a fan of CPANPLUS). |
Yeah CPANPLUS sucks. ALPM is broke right now, I still haven't updated it. I've updated it like 3 times and I am kind of sick of it. WWW::AUR still works, though. I'm rewriting cpan2aur right now because I am in a boring class. |
It makes me nervous to have 'cpan2aur --check' auto upload a new module before I have an opportunity to check it. I don't mind having cpan2aur generate things for me automatically, but I'd rather do at least a quick spot check before uploading to aur.
I haven't made a patch yet, I wanted to get some input first, but it seems like it would be a simple addition. If you're amenable, I'll fork and submit a pull request.
The text was updated successfully, but these errors were encountered: